<template>
    <div class="search">
   <h1>这是搜索页面</h1>
      <ul>
        <li v-for="item in newsList">
          <img v-lazy="rootUrl+item.plate1_img">
          <img v-lazy="rootUrl+item.plate1_img">
          <img v-lazy="rootUrl+item.plate1_img">
          <img v-lazy="rootUrl+item.plate1_img">
          <img v-lazy="rootUrl+item.plate1_img">
        </li>
      </ul>

    </div>
</template>

<script>
  import {Toast} from 'mint-ui';
    export default {
    data(){
    return{
      newsList:[],
      rootUrl:"http://psrecycle.oss-cn-hangzhou.aliyuncs.com/recycle/idcard/",
    }
    },
      methods:{
      getList(){
        this.$http.get("http://118.25.40.54:3000/apitext")
          .then(info=>{
            if(info.body!==undefined)
            {
              this.newsList = info.body.data;
              console.log(this.newsList)
            }else{
              Toast("获取数据失败...");
            }
          })
      }
      },
      created() {
        this.getList();
      }

    }
</script>

<style scoped>
    h1 {

        margin-top: 150px;
        font-size: 150px;
    }
    img[lazy=loading] {
      width: 1080px;
      height: 500px;
      margin: auto;
      background-color: #FFC66E;
    }
</style>